Skip to content

Conversation

@ipetrov117
Copy link
Contributor

There are use cases where the pod running the os-upgrade.sh script can be abruptly stopped (e.g. due to an update of SUC where at the same time OS migration is running).

In such cases, the previous cleanup logic left the state of the os-migration.service in a very dirty state, where consecutive pods running the os-upgrade.sh script were unable to start the os-migration.service again and immediately errored out with the following error:

Failed to start os-migration.service: Unit os-migration.service failed to load properly, please adjust/correct and reload service manager: Device or resource busy

The suggested changes enhance the cleanup function to:

  1. Stop the service -> ensures that if a pod is abruptly stopped, we also stop the corresponding systemd service that the pod has run
  2. Resets the state of the service -> ensures that no leftover service cache is present that can block a consecutive service run
  3. Remove the service file
  4. Reload the systemd services.

@ipetrov117 ipetrov117 merged commit a82c73b into suse-edge:main Jan 20, 2026
0 of 2 checks passed
ipetrov117 added a commit to ipetrov117/upgrade-controller that referenced this pull request Jan 20, 2026
(cherry picked from commit a82c73b)
Signed-off-by: Ivo Petrov <ivo.petrov@suse.com>
ipetrov117 added a commit that referenced this pull request Jan 20, 2026
Enhance cleanup function (#145)

(cherry picked from commit a82c73b)

Signed-off-by: Ivo Petrov <ivo.petrov@suse.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants